package com.vipshop.admin.web.controller;

import com.vipshop.core.service.MemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HomeController {
    @Autowired
    private MemberService userService;

    @RequestMapping("/home")
    public String Index() {
//        Integer count  = userService.findName("sxzku@qq.com");
//        User u = userService.getById(1L);
//        User user = new User();
//        user.setEmail("sxzku@qq.com");
//        Example<User> example = Example.of(user);
//        List<User> users = userService.findAll();
        return "HelloWord-home-";
    }
    @RequestMapping("/create")
    public String Create() {
//        User user=new User();
//        user.setUserName("sxzku");
//        user.setEmail("sxzku@qq.com");
//        user.setPassWord("123456");
//        user.setMobile("186965318321");
//        user.setNickName("沈祥忠");
//        userService.save(user);
        return "success";
    }
}
